<%@ taglib uri="/WEB-INF/myfaces_html.tld" 	prefix="h" %>
<%@ taglib uri="/WEB-INF/myfaces_core.tld" 	prefix="f" %>
<%@ taglib uri="/WEB-INF/tomahawk.tld"     	prefix="t" %>
<%@ taglib uri="/WEB-INF/myfaces_sandbox.tld"   prefix="s" %>
<%@ page import="java.util.ArrayList" %>

<f:view>
    <jsp:include page="/intestazione.jsp">
        <jsp:param name="titolo" value="Visualizzazione Movimenti in Dare e Avere"/>
    </jsp:include>
    <jsp:include page="/menu.jsp"/>
    <script language="javascript" src="./script/popup_full_center.js"></script>
    <script language="javascript" src="./script/ripristinoSessione.js"></script>        
    <h:form binding="#{dettaglioDareAvere.form}">    
        
        <table class="find" style="border: 2pt solid white; margin-bottom: 5px">
            <hr />
            <tr>  
                <td class="intestazionePagina" align="center">
                <strong> Movimenti in Dare e Avere </strong></td>                        
            </tr>        
        </table>
        
        
        <table class="dettaglio">
            <tbody>     
                <tr>     
                    <td>
                        <h:commandLink styleClass="commandLink_Style" dir="RTL" action="benvenuto" immediate="true">
                            <t:graphicImage url="/image/go-home.png" border="0"/>
                        </h:commandLink>              
                    </td>   
                </tr>
             
                <tr>                       
                    <td bgcolor="#DBEAFB"><em><strong> Descrizione</strong></em></td>
                    <td bgcolor="#DBEAFB"><em><strong>Totale Dare</strong></em></td>
                    <td bgcolor="#DBEAFB"><em><strong>Totale Avere</strong></em></td>
                    <td bgcolor="#DBEAFB"><em><strong>Differenza</strong></em></td>                           
                </tr>

                <tr>
                    <td bgcolor="#FFF06F"><t:outputText id="descrizione" value="#{beanDareAvere.descrizione}" styleClass="dettaglio_InputText">                  
                    </t:outputText></td>
                    <td bgcolor="#F06150"><t:outputText id="totDare" value="#{beanDareAvere.totaleDare}"    styleClass="dettaglio_InputText">                  
                        <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="#,##0.00" />
                    </t:outputText></td>      
                    <td bgcolor="#C1E0C0"><t:outputText id="totAvere" value="#{beanDareAvere.totaleAvere}" styleClass="dettaglio_InputText">                  
                        <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="#,##0.00" />
                    </t:outputText></td>
                    <td bgcolor="#FFF06F"><strong><t:outputText id="differenza" value="#{beanDareAvere.importo}" styleClass="dettaglio_InputText">                  
                        <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="#,##0.00" />
                    </t:outputText></td></strong></td>
                </tr>
            
            </tbody>
        </table>
        <br />
        
        
        
        
        <t:panelTabbedPane serverSideTabSwitch="false" >          
             
            <t:panelTab id="tabDare" label="Movimenti in Dare">                
                <f:verbatim><div  style="overflow: scroll; width:750px; height: 300px; white-space: nowrap; wrap: off"></f:verbatim>
                <t:dataTable id="listaDare" var="listaDare" value="#{beanDareAvere.movimentiDare}" preserveDataModel="true"           
                    styleClass="dataTableGestisci_Table2" 
                    headerClass="dataTableGestisci_Header"
                    rowClasses="dataTableGestisci_Row1, dataTableGestisci_Row2"          
                    columnClasses="dataTableGestisci_Column" 
                    rowOnMouseOver="this.style.backgroundColor='#FFF06F'"
                    rowOnMouseOut="this.style.backgroundColor=''">                  
                    
                    <t:column width="80%" >
                        <f:facet name="header">
                            <t:outputText value="Descrizione"/>
                        </f:facet>
                        <t:outputText value="#{listaDare.descrizione}" /> 
                    </t:column>                         
            
                    <t:column width="20%" style="text-align: right; background: #F06150;">
                        <f:facet name="header"  >
                            <t:outputText value="Importo"/>
                        </f:facet>
                        <t:outputText value="#{listaDare.importo}" > 
                            <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="#,##0.00" />
                        </t:outputText>
                    </t:column>
                
                </t:dataTable>  
                <f:verbatim></div></f:verbatim>                           
            </t:panelTab>            
        
            <t:panelTab id="tabAvere" label="Movimenti in Avere">                
                <f:verbatim><div  style="overflow: scroll; width:750px; height: 300px; white-space: nowrap; wrap: off"></f:verbatim>
                <t:dataTable id="listaAvere" var="listaAvere" value="#{beanDareAvere.movimentiAvere}" preserveDataModel="true"           
                    styleClass="dataTableGestisci_Table2" 
                    headerClass="dataTableGestisci_Header"
                    rowClasses="dataTableGestisci_Row1, dataTableGestisci_Row2"          
                    columnClasses="dataTableGestisci_Column" 
                    rowOnMouseOver="this.style.backgroundColor='#FFF06F'"
                    rowOnMouseOut="this.style.backgroundColor=''">                  
                    
                    <t:column width="80%" >
                        <f:facet name="header">
                            <t:outputText value="Descrizione"/>
                        </f:facet>
                        <t:outputText value="#{listaAvere.descrizione}" /> 
                    </t:column>                         
            
                    <t:column width="20%" style="text-align: right; background: #C1E0C0;">
                        <f:facet name="header"  >
                            <t:outputText value="Importo"/>
                        </f:facet>
                        <t:outputText value="#{listaAvere.importo}" > 
                            <s:convertNumber minIntegerDigits="1" maxFractionDigits="2" pattern="#,##0.00" />
                        </t:outputText>
                    </t:column>
                
                </t:dataTable>  
                <f:verbatim></div></f:verbatim>                           
            </t:panelTab>         
           
        </t:panelTabbedPane>    
    </h:form> 
    
    <h:form id="erroriDataBase" rendered="false">
        <f:verbatim><table><td align="left" class="messaggiErrore" height="2px"></f:verbatim>           
        <h:messages style="color: red" showDetail="true" showSummary="false"/>
        <f:verbatim></td></table></f:verbatim>
    </h:form>  
    
    <jsp:include page="/piePagina.jsp"/>      
</f:view>
